package Aquarium;

import java.util.ArrayList;

public class Goldfish extends Fish
{
	
	public Goldfish(String name, String type)
	{
		super(5);
		setName(name);
		setType(type);
		setEaten(false);
	}

	@Override
	public void encounter(Fish f, ArrayList<Fish> world)
	{
		
		if(f.getType().equals("goldfish")){
			for(int i = 0; i < this.getNumberOfPossibleChildren(); i ++){
				Goldfish g = new Goldfish("goldfish", "goldfish");
				g.setEaten(true);
				world.add(g);
			}
			f.setHasReproduced(true);
			this.setHasReproduced(true);
		}
		
		if(f.getType().equals("muskie")){
			world.remove(this);
			f.setEaten(true);
		}
		
		if(f.getType().equals("shark")){
			
		}
	}


}
